package com.guigu.www.luolujin.Conteoller;

import com.guigu.www.luolujin.Service.LljTemplateWholesomeService;
import com.guigu.www.pojo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 作者 罗露金
 */
@RestController
@RequestMapping("/LljTemplateWholesomeServlet")
public class LljTemplateWholesomeServlet {
    @Autowired
    LljTemplateWholesomeService service;
    @GetMapping()
    public PageVo<TemplateWholesome> pageTemplateWholesome(Integer pageNum, Integer pageSize, String tempWhoTitle){
        return service.pageTemplateWholesome(pageNum, pageSize, tempWhoTitle);
    }
    @PutMapping()
    public void updateTemplateWholesome(Integer tempWhoId,Integer tempWhoState){
        service.updateTemplateWholesome(tempWhoId, tempWhoState);
    }
    @PostMapping()
    public void insertTemplateWholesome(@RequestBody TemplateWholesome TemplateWholesome, Integer[] tempWhoDeId){
        service.insertTemplateWholesome(TemplateWholesome, tempWhoDeId);
    }
    @GetMapping("/queryById")
    public  List<TemplateWholesomeDetails> queryById(int tempWhoId) {
        return service.queryById(tempWhoId);
    }
}
